<template>
  <view class="contant">
	  <!-- :dictionary='state.dictionary' -->
	<policyAgreement  :type-code='state.typeCode' :id="infoId"  ></policyAgreement>
  </view>
</template>

<script lang="ts" setup>
//传子组件类型是图片还是内容，id多少，进而做图片以及富文本的处理
import { ref,reactive } from "vue";
import { onShow, onLoad } from "@dcloudio/uni-app";
// import { fetchConfigList } from "@/api/order.ts";
import policyAgreement from "@/components/policyAgreement";
const state = reactive({
		// dictionary: "1", // 字典值,后台路由配置，1-99 开发自用，大于100为用户自配
		typeCode: "news", // 类型是图片还是内容，pic以及news
		id: null, // 具体的相应字典,相应类型的某一条数据,需从列表接口自己检索                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
	})
	const infoId = ref(null)
onLoad(async (options) => {
	
	infoId.value = Number(options.id) 
	uni.setNavigationBarTitle({
		title: options.title
	});
});

</script>
<style lang="scss" scoped>

</style>
